<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三层垂直布局</title>
    <style>
        .wrap{
            position: relative;
            width: 800px;
            height: 400px;
        }
        .header{
            position:absolute;
            top:0;
            width: 100%;
            height: 100px;
            background-color: pink;
        }
        .footer{
            position:absolute;
            bottom:0;
            width: 100%;
            height: 200px;
            background-color: pink;
        }
        .center{
            height: 100%;
            background-color: orange;
            /* overflow: hidden; */
        }
        .center-inner{
            /* margin: 100px 0 200px 0; */
            padding: 100px 0 200px 0;
            height: 100%;
            background-color: blue;
            box-sizing: border-box;
        }
    </style>
</head>
<body>
    <!-- 
        需求：实现满足以下条件的三层垂直布局
        1. header和footer宽高固定，center高度占据剩余空间，响应变化
        2. dom渲染优先级：footer - 1， header - 2， center - 3
    -->
    <div class="wrap">
        <div class="footer">footer</div>
        <div class="header">header</div>
        <div class="center">
            <div class="center-inner">hhh</div>
        </div>
    </div>
</body>
</html>